export const enum UserCustomCode {
  SuccessRegister = 20100,
  LoginSuccess = 20101,
  GetProfileSuccess = 20102,
  SuccessDelete = 20103,
  SuccessUpdate = 20104,
  SuccessImport = 20105,
  SuccessSearch = 20106,
  SuccessRefresh = 20107,

  UserNotFound = 40100,
  UserAlreadyExists = 40101,
  UserNotMatch = 40102,
  PasswordNotMatch = 40103,
  NoPermissionCreate = 40104,
  NoPermissionPatch = 40105,

  PasswordHashError = 50100,
  PasswordResetError = 50101,
  TokenGenError = 50102
}

export const userMessage = {
  'en-US': {
    [UserCustomCode.SuccessRegister]: 'Register Success',
    [UserCustomCode.LoginSuccess]: 'Login Success',
    [UserCustomCode.GetProfileSuccess]: 'Get User Profile Success',
    [UserCustomCode.SuccessDelete]: 'Delete User Success',
    [UserCustomCode.SuccessUpdate]: 'Update User Info Success',
    [UserCustomCode.SuccessImport]: 'Import User Success',
    [UserCustomCode.SuccessSearch]: 'Search User Success',
    [UserCustomCode.SuccessRefresh]: 'Refresh Token Success',

    [UserCustomCode.UserNotFound]: 'User Not Found',
    [UserCustomCode.UserAlreadyExists]: 'User Already Exists',
    [UserCustomCode.UserNotMatch]: 'Username or Password Not Match',
    [UserCustomCode.PasswordNotMatch]: 'Password Not Match',
    [UserCustomCode.NoPermissionCreate]: 'No Permission Create',
    [UserCustomCode.NoPermissionPatch]: 'No Permission Patch'
  },
  'zh-CN': {
    [UserCustomCode.SuccessRegister]: '注册成功',
    [UserCustomCode.LoginSuccess]: '登录成功',
    [UserCustomCode.GetProfileSuccess]: '获取用户信息成功',
    [UserCustomCode.SuccessDelete]: '删除用户成功',
    [UserCustomCode.SuccessUpdate]: '修改用户信息成功',
    [UserCustomCode.SuccessImport]: '导入用户成功',
    [UserCustomCode.SuccessSearch]: '搜索用户成功',
    [UserCustomCode.SuccessRefresh]: '刷新 Token 成功',

    [UserCustomCode.UserNotFound]: '用户不存在',
    [UserCustomCode.UserAlreadyExists]: '用户已存在',
    [UserCustomCode.UserNotMatch]: '用户名或密码错误',
    [UserCustomCode.PasswordNotMatch]: '密码不匹配',
    [UserCustomCode.NoPermissionCreate]: '没有创建权限',
    [UserCustomCode.NoPermissionPatch]: '没有修改权限'
  }
} as const
